package com.bharatonjava.swift.service;

import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.bharatonjava.swift.dao.IEmployeeDao;
import com.bharatonjava.swift.dao.IEnumerationsDao;
import com.bharatonjava.swift.domain.Employee;

@Service
public class EmployeeService {

	private IEmployeeDao employeeDao;
	private IEnumerationsDao enumDao;
	
	public void setEmployeeDao(IEmployeeDao employeeDao) {
		this.employeeDao = employeeDao;
	}
	
	public void setEnumDao(IEnumerationsDao enumDao) {
		this.enumDao = enumDao;
	}
	
	@Transactional
	public Long saveEmployee(Employee employee){
		Long employeeId = employeeDao.addEmployee(employee);
		return employeeId;
	}
}
